Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

types: make vint_[en/de]code functions pub #1047

Closed
wants to merge 1 commit into from

Conversation

muzarski
Copy link
Contributor

@muzarski muzarski commented Jul 31, 2024

This is just for the sake of cpp-rust-driver
which implements custom serialization.

Pre-review checklist

  • I have split my patch into logically separate commits.
  • All commit messages clearly explain what they change and why.
  • [] I added relevant tests for new features and bug fixes.
  • All commits compile, pass static checks and pass test.
  • PR description sums up the changes and reasons why they should be introduced.
  • [ ] I have provided docstrings for the public items that I want to introduce.
  • [ ] I have adjusted the documentation in ./docs/source/.
  • [ ] I added appropriate Fixes: annotations to PR description.

This is just for the sake of cpp-rust-driver
which implements custom serialization.
@wprzytula
Copy link
Collaborator

@muzarski Please investigate the failing CI, especially cassandra tests.

@Lorak-mmk
Copy link
Collaborator

Is this still needed after yesterdays changes to serialization in cpp-rust-driver?

@wprzytula
Copy link
Collaborator

Is this still needed after yesterdays changes to serialization in cpp-rust-driver?

As I see it, one of scylla_cql's roles is to be a low-level API for interacting with the DB, also to be used by interested parties independently from scylla crate. For that to be possible, all its functionality should be public.

@Lorak-mmk
Copy link
Collaborator

Is this still needed after yesterdays changes to serialization in cpp-rust-driver?

As I see it, one of scylla_cql's roles is to be a low-level API for interacting with the DB, also to be used by interested parties independently from scylla crate. For that to be possible, all its functionality should be public.

We can export a function after 1.0 if needed, but we can't un-export it, and exporting everything makes it much harder to make any changes.
If those functions are not needed by either scylla or cpp-rust-driver then I see no reason to export them until there is a use case for that.

@wprzytula
Copy link
Collaborator

Is this still needed after yesterdays changes to serialization in cpp-rust-driver?

As I see it, one of scylla_cql's roles is to be a low-level API for interacting with the DB, also to be used by interested parties independently from scylla crate. For that to be possible, all its functionality should be public.

We can export a function after 1.0 if needed, but we can't un-export it, and exporting everything makes it much harder to make any changes. If those functions are not needed by either scylla or cpp-rust-driver then I see no reason to export them until there is a use case for that.

scylla_cql's public API is not public API of scylla, so I don't see any hazard in exporting everything from scylla_cql. It's on scylla crate to control re-exports from scylla_cql properly.

@Lorak-mmk
Copy link
Collaborator

Lorak-mmk commented Aug 1, 2024

Is this still needed after yesterdays changes to serialization in cpp-rust-driver?

As I see it, one of scylla_cql's roles is to be a low-level API for interacting with the DB, also to be used by interested parties independently from scylla crate. For that to be possible, all its functionality should be public.

We can export a function after 1.0 if needed, but we can't un-export it, and exporting everything makes it much harder to make any changes. If those functions are not needed by either scylla or cpp-rust-driver then I see no reason to export them until there is a use case for that.

scylla_cql's public API is not public API of scylla, so I don't see any hazard in exporting everything from scylla_cql. It's on scylla crate to control re-exports from scylla_cql properly.

https://rust-lang.github.io/api-guidelines/necessities.html#public-dependencies-of-a-stable-crate-are-stable-c-stable

When we release scylla 1.0 scylla-cql will need to already be 1.0 and so have its API stable. Good luck making any changes after that if you export everything.

scylla-cql, like any other library in existance, has its public API. In scylla-cql public API for vints is SerializeValue implementation and implementations for deserialization traits - and this is what cpp-rust-driver is using now IIUC.
vint_[en/de]code are internal implementation detail and unless there is a need for them to be public they should not be.

@muzarski
Copy link
Contributor Author

muzarski commented Aug 1, 2024

I'll close it. I agree that for now, there is no need to make vint_ util functions public.

@muzarski muzarski closed this Aug 1, 2024
@muzarski muzarski deleted the vint_utils_pub branch October 29, 2024 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants